<template>
	<view>
		<view v-for="(item,index) in yurr" :key="index">
			<image @click="prvimg(item)" style="margin-left: 7%;border-radius: 50rpx;margin-top: 52rpx;" mode="widthFix" v-bind:src="item.toxiang"></image>
			<view style="font-size: 35rpx;font-weight: 900;text-align: center;margin-top: 50rpx;">{{item.mingzi}}小朋友</view>
		    <view style="font-size: 35rpx;font-weight: 700;margin-left: 100rpx;margin-top: 60rpx;float: left;3">性别:{{item.xinbiee}}</view>
			<view style="font-size: 35rpx;font-weight: 700;float: left;margin-top: 60rpx;margin-left: 80rpx;">入学时间:{{item.ruxue}}</view>
			
			<view style="float: left;font-size: 35rpx;font-weight: 700;margin-left: 100rpx;margin-top: 50rpx;">老师对{{item.mingzi}}的评价:</view>
			<view v-if="item.pingjia==''" style="float: left;font-weight: 700;font-size: 35rpx;margin-left: 100rpx;margin-top: 50rpx;">暂时没有老师对{{item.mingzi}}小朋友的评价</view>
			<view style="width: 85%;border: 0px solid red;float: left;margin-left: 100rpx;">
			<view v-if="item.pingjia!=''" style="margin-top: 0rpx;font-size: 35rpx;font-weight: 600;margin-left: 0rpx;">{{item.pingjia}}</view>
			</view>
			<view style="float: left;font-size: 35rpx;font-weight: 700;margin-left: 100rpx;margin-top: 20rpx;">评价时间:</view>
			<view style="width: 100%;float: left;border: 0px solid red;margin-top: 20rpx;">
				<view style="font-size: 35rpx;font-weight: 700;margin-left: 100rpx;">{{item.pingjiashijian}}</view>
			</view>
			<view style="width: 100%;float: left;height: 100rpx;"></view>
		</view>
	</view>
</template>

<script>
	
		import cusPreviewImg from '../../components/cus-previewImg/cus-previewImg.vue'
	import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue'; //引用插件
	export default {
		components: {
			
			 previewImage
		},
		data() {
			return {
				yurr:[],
				imgs:""
			}
		},
		onLoad(op) {
			var that=this
			that.jiewubandiyi(op)
		},
		methods: {
			jiewubandiyi(op){
				var that=this
				var par={
					_id:op._id
				}
				const db = uniCloud.database();
				db.collection("jiewuban")
				.where(par)
				.get()
				.then(function(e){
					if(e.result.data==""){
						console.log("暂时没有数据")
					}else{
						that.yurr=e.result.data
						that.imgs=e.result.data[0].toxiang
					}
				})
				.catch(function(d){
					
				})
			},
			prvimg(cururl) {
				//图片预览
				uni.previewImage({
					urls: this.imgs,
					current: cururl.toxiang
				})
			}
		}
	}
</script>

<style>

</style>
